package self;

import java.util.Arrays;
import java.util.Comparator;

public class Compare {
    public static void main(String[] args) {
        int[] str = {4,9,5,2,71,385,8};
        System.out.println(Arrays.toString(str));
        Arrays.sort(str);
        System.out.println(Arrays.toString(str));
    }

}
class Comp<T> implements Comparator<T>{
    @Override
    public int compare(T o1, T o2) {
        if (o1.hashCode()>o2.hashCode()) return 0;
        return -1;
    }
}

class Comp2<T> implements Comparable<T>{
    @Override
    public int compareTo(Object o) {
        return 1;
    }
}